<?php if (!defined('TL_ROOT')) die('You cannot access this file directly!');

/**
 * Contao Open Source CMS
 * Copyright (C) 2005-2011 Leo Feyer
 *
 * Formerly known as TYPOlight Open Source CMS.
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation, either
 * version 3 of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program. If not, please visit the Free
 * Software Foundation website at <http://www.gnu.org/licenses/>.
 *
 * PHP version 5
 * @copyright  2012 Andreas Koob 
 * @author     Andreas Koob 
 * @package    piwik_analyser 
 * @license    LGPL 
 * @filesource
 */


/**
 * Class piwik_analyser_module_referers
 *
 * @copyright  2012 Andreas Koob 
 * @author     Andreas Koob 
 * @package    Controller
 */
class piwik_analyser_module_referers extends frontend
{
	private $functions;
	
	public function __construct()
	{
		$this->import('Database');
		$this->import('Input');
		$this->functions = new piwik_analyser_functions();
	}
	
	public function getFunctions($currentFunction)
	{
		$strFunctions='';
		$strFunctions.='<option value="referers.getreferertype"';if($currentFunction=='actions.get'){$strFunctions.=' selected="selected"';}$strFunctions.='>getRefererType (Not implemented)</option>';
		$strFunctions.='<option value="referers.getkeywords"';if($currentFunction=='actions.getpageurls'){$strFunctions.=' selected="selected"';}$strFunctions.='>getKeywords (Not implemented)</option>';
		$strFunctions.='<option value="referers.getkeywordsforpageurl"';if($currentFunction=='actions.getentrypageurls'){$strFunctions.=' selected="selected"';}$strFunctions.='>getKeywordsForPageUrl (Not implemented)</option>';
		$strFunctions.='<option value="referers.getkeywordsforpagetitle"';if($currentFunction=='actions.getexitpageurls'){$strFunctions.=' selected="selected"';}$strFunctions.='>getKeywordsForPageTitle (Not implemented)</option>';
		$strFunctions.='<option value="referers.getsearchenginesfromkeywordid"';if($currentFunction=='actions.getpageurl'){$strFunctions.=' selected="selected"';}$strFunctions.='>getSearchEngingesFromKeywordId (Not implemented)</option>';
		$strFunctions.='<option value="referers.getsearchengines"';if($currentFunction=='actions.getpagetitles'){$strFunctions.=' selected="selected"';}$strFunctions.='>getSearchEngines (Not implemented)</option>';
		$strFunctions.='<option value="referers.getkeywordsfromsearchengineid"';if($currentFunction=='actions.getpagetitle'){$strFunctions.=' selected="selected"';}$strFunctions.='>getKeywordsFromSearchEngineId (Not implemented)</option>';
		$strFunctions.='<option value="referers.getcampaigns"';if($currentFunction=='actions.getcampaigns'){$strFunctions.=' selected="selected"';}$strFunctions.='>getCampaigns (Not implemented)</option>';
		$strFunctions.='<option value="referers.getkeywordsfromcampaignid"';if($currentFunction=='actions.getdownloads'){$strFunctions.=' selected="selected"';}$strFunctions.='>getKeywordsFromCampaignId (Not implemented)</option>';
		$strFunctions.='<option value="referers.getwebsites"';if($currentFunction=='actions.getdownload'){$strFunctions.=' selected="selected"';}$strFunctions.='>getWebsites (Not implemented)</option>';
		$strFunctions.='<option value="referers.geturlsfromwebsiteid"';if($currentFunction=='actions.getoutlinks'){$strFunctions.=' selected="selected"';}$strFunctions.='>getUrlsFromWebsiteId (Not implemented)</option>';
		$strFunctions.='<option value="referers.getnumberofdistinctsearchengines"';if($currentFunction=='actions.getoutlink'){$strFunctions.=' selected="selected"';}$strFunctions.='>getNumberOfDistinctSearchEninges (Not implemented)</option>';
		$strFunctions.='<option value="referers.getnumberofdistinctkeywords"';if($currentFunction=='actions.get'){$strFunctions.=' selected="selected"';}$strFunctions.='>getNumberOfDistinctKeywords (Not implemented)</option>';
		$strFunctions.='<option value="referers.getnumberofdistinctcampaigns"';if($currentFunction=='actions.getpageurls'){$strFunctions.=' selected="selected"';}$strFunctions.='>getNumberOfDistinctCampaigns (Not implemented)</option>';
		$strFunctions.='<option value="referers.getnumberofdistinctwebsites"';if($currentFunction=='actions.getentrypageurls'){$strFunctions.=' selected="selected"';}$strFunctions.='>getNumberOfDistinctWebsites (Not implemented)</option>';
		$strFunctions.='<option value="referers.getnumberofdistinctwebsitesurls"';if($currentFunction=='actions.getexitpageurls'){$strFunctions.=' selected="selected"';}$strFunctions.='>getNumberOfDistinctWebsitesUrls (Not implemented)</option>';
		return $strFunctions;
	}
	
	public function getQueryCode($function)
	{
		switch($function)
		{
			case 'referers.getreferertype':
				break;
			case 'referers.getkeywords':
				break;
			case 'referers.getkeywordsforpageurl':
				break;
			case 'referers.getkeywordsforpagetitle':
				break;
			case 'referers.getsearchenginesfromkeywordid':
				break;
			case 'referers.getsearchengines':
				break;
			case 'referers.getkeywordsfromsearchengineid':
				break;
			case 'referers.getcampaigns':
				break;
			case 'referers.getkeywordsfromcampaignid':
				break;
			case 'referers.getwebsites':
				break;
			case 'referers.geturlsfromwebsiteid':
				break;
			case 'referers.getnumberofdistinctsearchengines':
				break;
			case 'referers.getnumberofdistinctkeywords':
				break;
			case 'referers.getnumberofdistinctcampaigns':
				break;
			case 'referers.getnumberofdistinctwebsites':
				break;
			case 'referers.getnumberofdistinctwebsitesurls':
				break;
			default:
				break;
		}
	}
	
	public function processFunction($function)
	{
		switch($function)
		{
			case 'referers.getreferertype':
				break;
			case 'referers.getkeywords':
				break;
			case 'referers.getkeywordsforpageurl':
				break;
			case 'referers.getkeywordsforpagetitle':
				break;
			case 'referers.getsearchenginesfromkeywordid':
				break;
			case 'referers.getsearchengines':
				break;
			case 'referers.getkeywordsfromsearchengineid':
				break;
			case 'referers.getcampaigns':
				break;
			case 'referers.getkeywordsfromcampaignid':
				break;
			case 'referers.getwebsites':
				break;
			case 'referers.geturlsfromwebsiteid':
				break;
			case 'referers.getnumberofdistinctsearchengines':
				break;
			case 'referers.getnumberofdistinctkeywords':
				break;
			case 'referers.getnumberofdistinctcampaigns':
				break;
			case 'referers.getnumberofdistinctwebsites':
				break;
			case 'referers.getnumberofdistinctwebsitesurls':
				break;
			default:
				break;
		}
	}
}

?>